#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
	int ch[30][30] = { 0 };
	int n;
	int j = 0;
	int i = 0;
	scanf("%d", &n);
	for (i = 0; i < n; i++)
	{
		ch[i][0] = 1;
	}
	for (i = 1; i < n; i++)
	{
		for (j = 1; j <= i; j++)
		{
			ch[i][j] = ch[i - 1][j] + ch[i - 1][j - 1];
		}
	}
	for (i = 0; i < n; i++)
	{
		for (j = 0; j < n; j++)
		{
			if (ch[i][j] != 0)
			{
				printf("%5d", ch[i][j]);
			}
		}
		printf("\n");
	}					
	return 0;
}



#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    int i, j, n = 0;
    int a[100][100] = { 0 };
    scanf("%d", &n);
    for (i = 0; i < n; i++)
    {
        a[i][0] = 1;
    }
    for (i = 1; i < n; i++)
    {
        for (j = 1; j <= i; j++)
        {
            a[i][j] = a[i - 1][j - 1] + a[i - 1][j];
        }
    }
    for (i = 0; i < n; i++)
    {
        for (j = 0; j <= i; j++)
            printf("%5d", a[i][j]);
        printf("\n");
    }
    return 0;
}